package com.example.weather.controller;

import com.example.weather.po.City;
import com.example.weather.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CityController {
    @Autowired
    private CityService cityService;

    @RequestMapping("/cities")
    public List<City> getAllCities() {
        return cityService.getAllCities();
    }
}
